Generating Documentation with Sphinx

With Sphinx you can:

  • Generate nicely formatted documentation in HTML and PDF
  • Docstrings are usefull twice: when reading the code and when consulting the manual
  • re-structured text (reST)
  • Include LaTeX formula's
  • Doc-string tests
  • Used exstensively by other (scientific) Python modules

ReST

Extensions for Sphinx

NumPy doc strings: numpydoc

  • While a rich set of markup is available, we limit ourselves to a very basic subset, in order to provide docstrings that are easy to read on text-only terminals
  • The length of docstring lines should be kept to 75 characters to facilitate reading the docstrings in text terminals.

NumPy documentation conventions:

HTML slides with Hieroglyph

Hieroglyph is an extension for Sphinx which builds HTML slides from ReStructured Text documents.

Generate Sphinx documentation based on IPython notebooks

Sphinx for Fortran

Publish documentation

You can use either Github's pages mechanism or Read the Docs.

Other documentation tools